import { createBrowserRouter } from "react-router-dom";

import App from '../App'
import Home from '../pages/home/Index'
import Index from '../pages/index/Index'
import Detail from '../pages/detail/Index'
export const tworouter=[
    {
        path:'/home',
        element:<Home></Home>,
        title:'首页'
    },
    {
        path:'/index',
        element:<Index></Index>,
        title:'订单'
    }
]

export const router=createBrowserRouter([
    {
        path:'/',
        element:<App></App>,
        children:tworouter
    },
    {
        path:'/detail/:id',
        element:<Detail></Detail>
    }
])

export default router